﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Fluent="clr-namespace:Fluent" xmlns:System="clr-namespace:System;assembly=mscorlib">
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="pack://application:,,,/Fluent;component\Themes\Office2010\Controls\ScrollBarWhite.xaml"/>
    <ResourceDictionary Source="pack://application:,,,/Fluent;component\Themes\Office2010\Controls\RibbonScrollViewer.xaml"/>
  </ResourceDictionary.MergedDictionaries>
  <Fluent:ObjectToImageConverter x:Key="StringToImageConvert"/>
  <Style TargetType="{x:Type Fluent:Button}" x:Key="ButtonBackstageStyle">
  	<Setter Property="Template" Value="{DynamicResource ButtonBackstageControlTemplate}"/>
        <Setter Property="Height" Value="81"/>
        <Setter Property="Width" Value="85"/>
    </Style>
  <ControlTemplate x:Key="ButtonBackstageControlTemplate" TargetType="{x:Type Fluent:Button}">
        <Grid x:Name="grid">
  			<Border x:Name="border" BorderThickness="1" Margin="0" Background="Transparent" BorderBrush="LightGray">
  				<StackPanel Margin="2" x:Name="stackPanel">
            		<ContentPresenter x:Name="iconImage" HorizontalAlignment="Center" Height="32" Width="32" VerticalAlignment="Center" Content="{Binding LargeIcon, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StringToImageConvert}}" Margin="9,9,9,0" SnapsToDevicePixels="True"/>
  					<Fluent:TwoLineLabel x:Name="twoLineLabel" Margin="7,7,7,5" VerticalAlignment="Center" Text="{TemplateBinding Header}"/>
  				</StackPanel>
  			</Border>
  	</Grid>
  	<ControlTemplate.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Opacity" TargetName="iconImage" Value="0.5"/>
        <Setter Property="Opacity" TargetName="twoLineLabel" Value="0.5"/>
        <Setter Property="Effect" TargetName="iconImage">
          <Setter.Value>
            <Fluent:GrayscaleEffect/>
          </Setter.Value>
        </Setter>
      </Trigger>
  		<Trigger Property="Size" Value="Small">
  			<Setter Property="Visibility" TargetName="iconImage" Value="Collapsed"/>
  			<Setter Property="Orientation" TargetName="stackPanel" Value="Horizontal"/>
  			<Setter Property="HorizontalAlignment" TargetName="stackPanel" Value="Center"/>
  			<Setter Property="VerticalAlignment" TargetName="stackPanel" Value="Center"/>
  			<Setter Property="Margin" TargetName="twoLineLabel" Value="2"/>
  			<Setter Property="Width" TargetName="grid" Value="Auto"/>
  			<Setter Property="Height" TargetName="grid" Value="Auto"/>
  			<Setter Property="HorizontalAlignment" TargetName="twoLineLabel" Value="Center"/>
  			<Setter Property="HasTwoLines" TargetName="twoLineLabel" Value="False"/>
  		</Trigger>
  		<Trigger Property="Size" Value="Middle">
  			<Setter Property="Orientation" TargetName="stackPanel" Value="Horizontal"/>
  			<Setter Property="VerticalAlignment" TargetName="stackPanel" Value="Center"/>
  			<Setter Property="Margin" TargetName="twoLineLabel" Value="7,0"/>
  			<Setter Property="Margin" TargetName="iconImage" Value="9,2,9,0"/>
  			<Setter Property="Width" TargetName="grid" Value="Auto"/>
  			<Setter Property="Height" TargetName="grid" Value="Auto"/>
  		</Trigger>
  		<Trigger Property="IsEnabled" Value="False">
  			<Setter Property="BorderBrush" TargetName="border" Value="#FFC8C8C9"/>
  		</Trigger>
  		<Trigger Property="IsMouseOver" Value="True">
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
			<Setter Property="BorderBrush" TargetName="border">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>	
				</Setter.Value>		
			</Setter>
  		</Trigger>
  		<Trigger Property="IsFocused" Value="True">
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
			<Setter Property="BorderBrush" TargetName="border">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>
				</Setter.Value>		
			</Setter>
  		</Trigger>
  		<Trigger Property="IsPressed" Value="True">
  			<Setter Property="BorderBrush" TargetName="border">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.5"/>	
				</Setter.Value>		
			</Setter>
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonPressedOuterBackgroundBrush}"/>
  		</Trigger>
  	</ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="{x:Type Fluent:ToggleButton}" x:Key="ToggleButtonBackstageStyle">
    <Setter Property="Template" Value="{DynamicResource ToggleButtonBackstageControlTemplate}"/>
        <Setter Property="Height" Value="81"/>
        <Setter Property="Width" Value="85"/>
    </Style>
  <ControlTemplate x:Key="ToggleButtonBackstageControlTemplate" TargetType="{x:Type Fluent:ToggleButton}">
  	<Grid x:Name="grid">
      <Border x:Name="border" BorderThickness="1" Margin="0" BorderBrush="LightGray">
       	<StackPanel x:Name="stackPanel">
            <ContentPresenter x:Name="iconImage" HorizontalAlignment="Center" Height="32" VerticalAlignment="Center" Content="{Binding LargeIcon, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StringToImageConvert}}" Width="32" Margin="9,9,9,0" SnapsToDevicePixels="True"/>
            <Fluent:TwoLineLabel x:Name="twoLineLabel" Margin="7,7,7,5" VerticalAlignment="Center" Text="{TemplateBinding Header}"/>
          </StackPanel>
      </Border>
    </Grid>
  <ControlTemplate.Triggers>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Opacity" TargetName="iconImage" Value="0.5"/>
        <Setter Property="Opacity" TargetName="twoLineLabel" Value="0.5"/>
        <Setter Property="Effect" TargetName="iconImage">
          <Setter.Value>
            <Fluent:GrayscaleEffect/>
          </Setter.Value>
        </Setter>
		<!--<Setter Property="BorderBrush" TargetName="border" Value="#FFC8C8C9"/>-->
      </Trigger>
      <Trigger Property="Size" Value="Small">
        <Setter Property="Visibility" TargetName="iconImage" Value="Collapsed"/>
        <Setter Property="Orientation" TargetName="stackPanel" Value="Horizontal"/>
        <Setter Property="HorizontalAlignment" TargetName="stackPanel" Value="Center"/>
        <Setter Property="VerticalAlignment" TargetName="stackPanel" Value="Center"/>
        <Setter Property="Margin" TargetName="twoLineLabel" Value="2"/>
        <Setter Property="Width" TargetName="grid" Value="Auto"/>
        <Setter Property="Height" TargetName="grid" Value="Auto"/>
        <Setter Property="HorizontalAlignment" TargetName="twoLineLabel" Value="Center"/>
        <Setter Property="HasTwoLines" TargetName="twoLineLabel" Value="False"/>
      </Trigger>
      <Trigger Property="Size" Value="Middle">
        <Setter Property="Orientation" TargetName="stackPanel" Value="Horizontal"/>
        <Setter Property="VerticalAlignment" TargetName="stackPanel" Value="Center"/>
        <Setter Property="Margin" TargetName="twoLineLabel" Value="7,0"/>
        <Setter Property="Margin" TargetName="iconImage" Value="9,2,9,0"/>
        <Setter Property="Width" TargetName="grid" Value="Auto"/>
        <Setter Property="Height" TargetName="grid" Value="Auto"/>
      </Trigger>
      <Trigger Property="IsMouseOver" Value="True">
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
			<Setter Property="BorderBrush" TargetName="border">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>	
				</Setter.Value>		
			</Setter>
  		</Trigger>
  		<Trigger Property="IsFocused" Value="True">
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
			<Setter Property="BorderBrush" TargetName="border">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>
				</Setter.Value>		
			</Setter>
  		</Trigger>
  		<Trigger Property="IsPressed" Value="True">
  			<Setter Property="BorderBrush" TargetName="border">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.5"/>	
				</Setter.Value>		
			</Setter>
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonPressedOuterBackgroundBrush}"/>
  		</Trigger>
      <Trigger Property="IsChecked" Value="True">
        <Setter Property="BorderBrush" TargetName="border">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>
				</Setter.Value>		
			</Setter>
        <Setter Property="Background" TargetName="border">
        	<Setter.Value>
        		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.2"/>     	
			</Setter.Value>      
		</Setter>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
  <Style TargetType="{x:Type Fluent:DropDownButton}" x:Key="DropDownButtonBackstageStyle">
  	<Setter Property="Template" Value="{DynamicResource DropDownButtonBackstageControlTemplate}"/>
  	<Setter Property="Height" Value="81"/>
  	<Setter Property="Width" Value="85"/>   
  </Style>
  <ControlTemplate x:Key="DropDownButtonBackstageControlTemplate" TargetType="{x:Type Fluent:DropDownButton}">
  	<Grid>
  		<Border x:Name="PART_ButtonBorder" BorderThickness="1" Margin="0" BorderBrush="LightGray">
  			<StackPanel x:Name="stackPanel" Margin="0">
            		<ContentPresenter x:Name="iconImage" HorizontalAlignment="Center" Height="32" VerticalAlignment="Center" Content="{Binding LargeIcon, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource StringToImageConvert}}" Width="32" Margin="7,7,7,0" SnapsToDevicePixels="True"/>
  					<Fluent:TwoLineLabel x:Name="twoLineLabel" Margin="5,5,5,3" VerticalAlignment="Center" HasGlyph="True" Text="{TemplateBinding Header}"/>
  				</StackPanel>
  		</Border>
      <Popup
            x:Name="PART_Popup"
            Placement="Bottom"
            IsOpen="{TemplateBinding IsDropDownOpen}"
            AllowsTransparency="True"
            Focusable="False"
            PopupAnimation="Slide" Margin="0,0,-4,0" VerticalAlignment="Top" Grid.ColumnSpan="2">
        <Grid
          Name="DropDown"
          SnapsToDevicePixels="True" Margin="0" VerticalAlignment="Top">
          <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="10"/>
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="10"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="PART_DropDownBorder" MinWidth="{TemplateBinding ActualWidth}" SnapsToDevicePixels="True" Background="{DynamicResource ContextMenuBarBackgroundBrush}" BorderBrush="{DynamicResource ContextMenuBarBorderBrush}" BorderThickness="1" CornerRadius="1" Grid.ColumnSpan="1" HorizontalAlignment="Stretch" VerticalAlignment="Top">
            <Grid Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top">
              <Border VerticalAlignment="Top" Width="Auto" Height="Auto" BorderBrush="{DynamicResource ContextMenuBarBackgroundBrush}" BorderThickness="1" CornerRadius="1"/>
              <Grid Margin="1" HorizontalAlignment="Stretch" VerticalAlignment="Top">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Rectangle Fill="{x:Null}" Stretch="Fill" Stroke="#FFE2E4E7" HorizontalAlignment="Left" Margin="24,0,0,0" Width="1" Height="Auto" Grid.RowSpan="2" Visibility="Visible" VerticalAlignment="Stretch"/>
                <ScrollViewer Margin="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
                  <Fluent:MenuPanel x:Name="PART_MenuPanel" IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
                </ScrollViewer>
                <Border x:Name="resizeBorder" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="11" BorderBrush="{DynamicResource ContextMenuBarResizeBorderBrush}" BorderThickness="0,1,0,0" Grid.Row="1" CornerRadius="0,0,1,1" Background="{DynamicResource ContextMenuBarResizeBackgoundBrush}">
                  <Grid>
                    <Thumb x:Name="PART_ResizeVerticalThumb" HorizontalAlignment="Stretch" Margin="0,0,0,-90" Width="Auto" Height="10" VerticalAlignment="Top" Cursor="SizeNS" Template="{DynamicResource ResizeVerticalThumbControlTemplate}"/>
                    <Thumb x:Name="PART_ResizeBothThumb" HorizontalAlignment="Right" Margin="0,0,0,-90" Width="10" Height="10" VerticalAlignment="Top" Cursor="SizeNWSE" Template="{DynamicResource ResizeBothThumbControlTemplate}"/>
                  </Grid>
                </Border>
              </Grid>
            </Grid>
          </Border>
        </Grid>
      </Popup>
  	</Grid>
  	<ControlTemplate.Triggers>
      <Trigger Property="ResizeMode" Value="None">
        <Setter Property="Visibility" TargetName="resizeBorder" Value="Collapsed"/>
      </Trigger>
      <Trigger Property="ResizeMode" Value="Both">
        <Setter Property="Visibility" TargetName="PART_ResizeVerticalThumb" Value="Collapsed"/>
        <Setter Property="Visibility" TargetName="PART_ResizeBothThumb" Value="Visible"/>
        <Setter Property="Visibility" TargetName="resizeBorder" Value="Visible"/>
      </Trigger>
      <Trigger Property="ResizeMode" Value="Vertical">
        <Setter Property="Visibility" TargetName="PART_ResizeBothThumb" Value="Collapsed"/>
        <Setter Property="Visibility" TargetName="PART_ResizeVerticalThumb" Value="Visible"/>
        <Setter Property="Visibility" TargetName="resizeBorder" Value="Visible"/>
      </Trigger>
  		<Trigger Property="IsEnabled" Value="False">
        <Setter Property="Opacity" TargetName="iconImage" Value="0.5"/>
        <Setter Property="Opacity" TargetName="twoLineLabel" Value="0.5"/>
        <Setter Property="Effect" TargetName="iconImage">
          <Setter.Value>
            <Fluent:GrayscaleEffect/>
          </Setter.Value>
        </Setter>
  			<Setter Property="BorderBrush" TargetName="PART_ButtonBorder" Value="#FFC8C8C9"/>
  		</Trigger>
  		<Trigger Property="IsMouseOver" Value="True">
  			<Setter Property="BorderBrush" TargetName="PART_ButtonBorder">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>	
				</Setter.Value>
			</Setter>
  			<Setter Property="Background" TargetName="PART_ButtonBorder" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
  		</Trigger>
  		<Trigger Property="IsFocused" Value="True">
  			<Setter Property="BorderBrush" TargetName="PART_ButtonBorder">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>	
				</Setter.Value>		
			</Setter>
  			<Setter Property="Background" TargetName="PART_ButtonBorder" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
  		</Trigger>
  		<Trigger Property="IsDropDownOpen" Value="True">
  			<Setter Property="BorderBrush" TargetName="PART_ButtonBorder">
  				<Setter.Value>
  					<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.5"/>	
				</Setter.Value>		
			</Setter>
  			<Setter Property="Background" TargetName="PART_ButtonBorder" Value="{DynamicResource ButtonPressedOuterBackgroundBrush}"/>
  		</Trigger>
  	</ControlTemplate.Triggers>
  </ControlTemplate>
  
  
  <ControlTemplate TargetType="{x:Type Fluent:GalleryItem}" x:Key="GalleryItemBackstageControlTemplate">
        	<Grid Background="{DynamicResource TransparentBrush}">
        		<Border x:Name="hoverBorder" BorderThickness="1" Background="Transparent">
        			<ContentPresenter x:Name="contentPresenter" Margin="1" Opacity="1"/>
        		</Border>        		
        	</Grid>
        	<ControlTemplate.Triggers>
        		<Trigger Property="IsEnabled" Value="False">
        			<Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
        		</Trigger>
        		<Trigger Property="IsSelected" Value="True">
        			<Setter Property="Background" TargetName="hoverBorder" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
        		</Trigger>
        		<Trigger Property="IsMouseOver" Value="True">
        			<Setter Property="Background" TargetName="hoverBorder" Value="{DynamicResource ButtonPressedOuterBackgroundBrush}"/>
        		</Trigger>
        	</ControlTemplate.Triggers>
        </ControlTemplate>
  <Style x:Key="GalleryItemBackstageStyle" TargetType="{x:Type Fluent:GalleryItem}">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="Template" Value="{StaticResource GalleryItemBackstageControlTemplate}"/>
	<Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
  </Style>
  <ControlTemplate TargetType="{x:Type ComboBoxItem}" x:Key="ComboBoxItemBackstageControlTemplate">
          <Grid Background="{DynamicResource TransparentBrush}" HorizontalAlignment="Stretch">
            <Border x:Name="hoverBorder" Background="Transparent">
              <ContentPresenter x:Name="contentPresenter" Margin="1" Opacity="1"/>
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
            </Trigger>
            <Trigger Property="IsSelected" Value="True">
        			<Setter Property="Background" TargetName="hoverBorder">
        				<Setter.Value>
  							<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.5"/>	
						</Setter.Value>   			
					</Setter>
        	</Trigger>
        	<Trigger Property="IsMouseOver" Value="True">
        		<Setter Property="Background" TargetName="hoverBorder">
        			<Setter.Value>
  						<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}" Opacity="0.3"/>	
					</Setter.Value>
				</Setter>
        	</Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
  <Style x:Key="MetroComboBoxItemBackstageStyle" TargetType="{x:Type ComboBoxItem}">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="MinHeight" Value="40"/>
    <Setter Property="Template" Value="{StaticResource ComboBoxItemBackstageControlTemplate}"/>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
  </Style>
  
  
  <Style TargetType="{x:Type Fluent:ComboBox}" x:Key="ComboBoxBackstageStyle">
  	<Setter Property="Template" Value="{DynamicResource ComboBoxBackstageControlTemplate}"/>
  	<Setter Property="Height" Value="42"/>
  	<Setter Property="Width" Value="229"/>
  	<Setter Property="IsReadOnly" Value="True"/>
  	<Setter Property="IsEditable" Value="False"/>
    <Setter Property="MaxDropDownHeight" Value="{x:Static System:Double.PositiveInfinity}"/>
  </Style>
  <ControlTemplate x:Key="ComboBoxBackstageControlTemplate" TargetType="{x:Type Fluent:ComboBox}">
  	<ControlTemplate.Resources>
      	<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource ScrollBarWhite}"/>
      	<Style x:Key="{x:Type Fluent:ToggleButton}" TargetType="{x:Type Fluent:ToggleButton}" BasedOn="{StaticResource ToggleButtonBackstageStyle}"/>
      	<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource ScrollViewerStyle}"/>
  		<Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource MetroComboBoxItemBackstageStyle}"/>
	</ControlTemplate.Resources>
  	<Grid >
      		<Border Height="Auto" x:Name="PART_ContentBorder" HorizontalAlignment="Stretch">
        		<Grid>
          			<Grid.ColumnDefinitions>
            			<ColumnDefinition Width="*"/>
            			<ColumnDefinition Width="22"/>
          			</Grid.ColumnDefinitions>
          			<Fluent:ToggleButton Size="Small" Width="{Binding ElementName=PART_ContentBorder, Path=ActualWidth}" IsDefinitive="False" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="2" Margin="0" CanAddToQuickAccessToolBar="False"/>
          			<ContentPresenter Margin="3" x:Name="PART_ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="Top" HorizontalAlignment="Left" />
          			<Image Margin="0" Stretch="None" x:Name="PART_SelectedImage" IsHitTestVisible="False" VerticalAlignment="Top" HorizontalAlignment="Left" Visibility="Collapsed" Width="Auto" Height="Auto"/>
          			<TextBox Focusable="True" x:Name="PART_EditableTextBox" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="NoWrap" BorderThickness="0,0,0,0" IsReadOnly="{TemplateBinding IsReadOnly}" Background="{DynamicResource TextBoxBackgroundBrush}" Visibility="Collapsed"/>
          			<Path x:Name="path" HorizontalAlignment="Center" Margin="0,0,0,0" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="0" Data="M0,0L1,1 2,0z" Fill="#FF000000" Width="7" Height="4" VerticalAlignment="Center" Grid.Column="1"/>
        		</Grid>
      		</Border>
      <Popup x:Name="PART_Popup"
                Placement="Bottom"
                PlacementTarget="{Binding ElementName=PART_ContentBorder}"
                IsOpen="{TemplateBinding IsDropDownOpen}"
                AllowsTransparency="True"
                Focusable="False"
                PopupAnimation="Slide" Margin="0,0,-4,0" VerticalAlignment="Top" Grid.ColumnSpan="2">
        <Popup.Resources>
          <ResourceDictionary>
            <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource ScrollBarWhite}"/>
          </ResourceDictionary>
        </Popup.Resources>
        <Grid
          Name="DropDown"
          SnapsToDevicePixels="True" Margin="0" VerticalAlignment="Top">
          <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="10"/>
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="10"/>
          </Grid.ColumnDefinitions>
          <Border x:Name="PART_DropDownBorder" MinWidth="{Binding ActualWidth, ElementName=PART_ContentBorder}" SnapsToDevicePixels="True" Background="{DynamicResource ContextMenuBarBackgroundBrush}" BorderBrush="{DynamicResource ContextMenuBarBorderBrush}" BorderThickness="1" CornerRadius="1" Grid.ColumnSpan="1" HorizontalAlignment="Stretch" VerticalAlignment="Top">
            <Grid Width="Auto" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" KeyboardNavigation.DirectionalNavigation="Cycle">
              <Border VerticalAlignment="Stretch" Width="Auto" Height="Auto" BorderBrush="{DynamicResource ContextMenuBarBackgroundBrush}" BorderThickness="1" CornerRadius="1"/>
              <Grid Margin="1" HorizontalAlignment="Stretch" VerticalAlignment="Top">
                <Grid.RowDefinitions>
                  <RowDefinition Height="*"/>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Rectangle Fill="{x:Null}" Stretch="Fill" Stroke="#FFE2E4E7" HorizontalAlignment="Left" Margin="24,0,0,0" Width="1" Height="Auto" Grid.RowSpan="2" Visibility="Visible" VerticalAlignment="Stretch"/>
                <Grid x:Name="PART_MenuPanel" MaxHeight="{TemplateBinding MaxDropDownHeight}" VerticalAlignment="Top">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                  </Grid.RowDefinitions>
                  <ScrollViewer Grid.Row="0" Focusable="False" BorderBrush="{DynamicResource GalleryBorderBrush}" x:Name="PART_ScrollViewer" Margin="1" SnapsToDevicePixels="True" KeyboardNavigation.DirectionalNavigation="None" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Visible" BorderThickness="0,0,0,1">
                    <Fluent:GalleryPanel Background="White" x:Name="PART_GalleryPanel" ItemContainerGenerator="{Binding ItemContainerGenerator, RelativeSource={RelativeSource TemplatedParent}}" GroupBy="{TemplateBinding GroupBy}" IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="None" ItemHeight="{TemplateBinding ItemHeight}" Orientation="Vertical"/>
                    <!--<StackPanel Background="White" IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="None" Orientation="Vertical"/>-->
                  </ScrollViewer>

                  <ContentPresenter Grid.Row="1" x:Name="menuPresenter" ContentSource="Menu" KeyboardNavigation.DirectionalNavigation="None" VerticalAlignment="Top"/>
                  
                </Grid>
                <Border x:Name="resizeBorder" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="11" BorderBrush="{DynamicResource ContextMenuBarResizeBorderBrush}" BorderThickness="0,1,0,0" Grid.Row="2" CornerRadius="0,0,1,1" Background="{DynamicResource ContextMenuBarResizeBackgoundBrush}">
                  <Grid>
                    <Thumb x:Name="PART_ResizeVerticalThumb" HorizontalAlignment="Stretch" Margin="0,0,0,-90" Width="Auto" Height="10" VerticalAlignment="Top" Cursor="SizeNS" Template="{DynamicResource ResizeVerticalThumbControlTemplate}"/>
                    <Thumb x:Name="PART_ResizeBothThumb" HorizontalAlignment="Right" Margin="0,0,0,-90" Width="10" Height="10" VerticalAlignment="Top" Cursor="SizeNWSE" Template="{DynamicResource ResizeBothThumbControlTemplate}"/>
                  </Grid>
                </Border>
              </Grid>
            </Grid>
          </Border>
        </Grid>
      </Popup>
  	</Grid>
  	<ControlTemplate.Triggers>
      <Trigger Property="ResizeMode" Value="None">
        <Setter Property="Visibility" TargetName="resizeBorder" Value="Collapsed"/>
      </Trigger>
      <Trigger Property="ResizeMode" Value="Both">
        <Setter Property="Visibility" TargetName="PART_ResizeVerticalThumb" Value="Collapsed"/>
        <Setter Property="Visibility" TargetName="PART_ResizeBothThumb" Value="Visible"/>
        <Setter Property="Visibility" TargetName="resizeBorder" Value="Visible"/>
      </Trigger>
      <Trigger Property="ResizeMode" Value="Vertical">
        <Setter Property="Visibility" TargetName="PART_ResizeBothThumb" Value="Collapsed"/>
        <Setter Property="Visibility" TargetName="PART_ResizeVerticalThumb" Value="Visible"/>
        <Setter Property="Visibility" TargetName="resizeBorder" Value="Visible"/>
      </Trigger>
  		<Trigger Property="IsEnabled" Value="False">
  			<Setter Property="BorderBrush" TargetName="PART_ContentBorder" Value="#FFC8C8C9"/>
  		</Trigger>  		
  	</ControlTemplate.Triggers>
  </ControlTemplate>
  
  <!--Button in Spinner Control Style-->
  <ControlTemplate x:Key="SpinnerButtonBackstageControlTemplate" TargetType="{x:Type RepeatButton}">
		<Border x:Name="border" BorderThickness="1" CornerRadius="2" Background="{DynamicResource TransparentBrush}" BorderBrush="{DynamicResource TransparentBrush}" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
			<Border x:Name="border1" Height="Auto" BorderBrush="{DynamicResource TransparentBrush}" BorderThickness="1" CornerRadius="2" Background="{DynamicResource TransparentBrush}">
				<Grid Height="Auto">
					<Rectangle x:Name="rectangle" StrokeThickness="0" Visibility="Collapsed">
						<Rectangle.Fill>
							<RadialGradientBrush Center="0.503,1" GradientOrigin="0.503,1" RadiusY="0.202">
								<GradientStop Color="#7FFFFFFF" Offset="0"/>
								<GradientStop Offset="1"/>
							</RadialGradientBrush>
						</Rectangle.Fill>
					</Rectangle>
						<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center" VerticalAlignment="Center"/>
				</Grid>
			</Border>
		</Border>
		<ControlTemplate.Triggers>
  		<Trigger Property="Border.BorderThickness" Value="0,1,0,0">
  			<Setter Property="CornerRadius" TargetName="border" Value="0,2,0,0"/>
  			<Setter Property="CornerRadius" TargetName="border1" Value="0,1,0,0"/>
  		</Trigger>
  		<Trigger Property="Border.BorderThickness" Value="0,0,1,0">
  			<Setter Property="CornerRadius" TargetName="border" Value="0,0,3,0"/>
  			<Setter Property="CornerRadius" TargetName="border1" Value="0,0,2,0"/>
  		</Trigger>
  		<Trigger Property="IsMouseOver" Value="False"/>			
  		<Trigger Property="IsPressed" Value="True">
  			<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonPressedOuterBorderBrush}"/>
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonPressedOuterBackgroundBrush}"/>
  			<Setter Property="Background" TargetName="border1" Value="{DynamicResource ButtonPressedInnerBackgroundBrush}"/>
  			<Setter Property="BorderBrush" TargetName="border1" Value="{DynamicResource ButtonPressedInnerBorderBrush}"/>
  		</Trigger>
  		<Trigger Property="IsEnabled" Value="False">
  			<Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
  		</Trigger>
  		<MultiTrigger>
  			<MultiTrigger.Conditions>
  				<Condition Property="IsMouseOver" Value="True"/>
  				<Condition Property="IsPressed" Value="False"/>
  			</MultiTrigger.Conditions>
  			<Setter Property="BorderBrush" TargetName="border1" Value="{DynamicResource ButtonHoverInnerBorderBrush}"/>
  			<Setter Property="Background" TargetName="border1" Value="{DynamicResource ButtonHoverInnerBackgroundBrush}"/>
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
  			<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonHoverOuterBorderBrush}"/>
  			<Setter Property="Visibility" TargetName="rectangle" Value="Visible"/>
  		</MultiTrigger>
  		<MultiTrigger>
  			<MultiTrigger.Conditions>
  				<Condition Property="IsKeyboardFocusWithin" Value="True"/>
  				<Condition Property="IsPressed" Value="False"/>
  			</MultiTrigger.Conditions>
  			<Setter Property="BorderBrush" TargetName="border1" Value="{DynamicResource ButtonHoverInnerBorderBrush}"/>
  			<Setter Property="Background" TargetName="border1" Value="{DynamicResource ButtonHoverInnerBackgroundBrush}"/>
  			<Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
  			<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonHoverOuterBorderBrush}"/>
  		</MultiTrigger>
  	</ControlTemplate.Triggers>
	</ControlTemplate>
  <Style x:Key="SpinnerButtonBackstageStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="Template" Value="{StaticResource SpinnerButtonBackstageControlTemplate}"/>
    <Setter Property="Foreground" Value="{DynamicResource DefaultFontBrush}"/>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
  </Style>    
  
  
  <!--Spinner Style-->
  <Style x:Key="SpinnerBackstageStyle" TargetType="{x:Type Fluent:Spinner}">
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
    <Setter Property="Foreground" Value="{DynamicResource DefaultFontBrush}"/>
    <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
    <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Fluent:Spinner}">
            <Grid Width="Auto" Height="22" Background="#00000000">
            	<Grid.ColumnDefinitions>
            		<ColumnDefinition Width="Auto"/>
            		<ColumnDefinition Width="*"/>
            	</Grid.ColumnDefinitions>
            	<StackPanel Orientation="Horizontal" Grid.ColumnSpan="1" x:Name="stackPanel" HorizontalAlignment="Left" Margin="0">
            		<Image Width="16" Height="16" VerticalAlignment="Center" Margin="4,0,3,0" Source="{TemplateBinding Icon}"/>
            		<TextBlock Text="{TemplateBinding Header}" TextWrapping="Wrap" VerticalAlignment="Center" Margin="2,0,4,0" x:Name="textBlock"/>
            	</StackPanel>
              <Border x:Name="border" Height="22" BorderThickness="1" Background="{DynamicResource TextBoxBackgroundBrush}" Grid.ColumnSpan="1" Grid.Column="1" Width="{TemplateBinding InputWidth}" CornerRadius="2">
              	<Border.BorderBrush>
              		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
              			<GradientStop Color="#FFABAFB2" Offset="0"/>
              			<GradientStop Color="#FFE1E6EC" Offset="1"/>
              		</LinearGradientBrush>
              	</Border.BorderBrush>
            	<Grid Grid.ColumnSpan="1" Grid.Column="1">
            		<Grid.ColumnDefinitions>
            			<ColumnDefinition Width="*"/>
            			<ColumnDefinition Width="17"/>
            		</Grid.ColumnDefinitions>
            		<Grid.RowDefinitions>
            			<RowDefinition Height="*"/>
            			<RowDefinition Height="*"/>
            		</Grid.RowDefinitions>

            		<TextBox x:Name="PART_TextBox" BorderThickness="0" Grid.RowSpan="2" Grid.Column="0" Background="{DynamicResource TextBoxBackgroundBrush}" Margin="1,0,0,0" Padding="1"/>
            		<Border x:Name="border1" BorderBrush="#FFBEC1C4" BorderThickness="1" Margin="0,-1,-1,0" Grid.RowSpan="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="0,2,0,0" Grid.Column="1" Visibility="Collapsed">
            			<Border.Background>
            				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            					<GradientStop Color="White" Offset="0"/>
            					<GradientStop Color="#FFF1F2F2" Offset="1"/>
            				</LinearGradientBrush>
            			</Border.Background>
            		</Border>
            		<Border x:Name="border2" BorderBrush="#FFBEC1C4" BorderThickness="1" Grid.ColumnSpan="1" Margin="0,-1,-1,-1" Grid.RowSpan="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="18" CornerRadius="0,0,2,0" Grid.Column="1" Grid.Row="1" Visibility="Collapsed">
            			<Border.Background>
            				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            					<GradientStop Color="White" Offset="0"/>
            					<GradientStop Color="#FFF1F2F2" Offset="1"/>
            				</LinearGradientBrush>
            			</Border.Background>
            		</Border>
            		<RepeatButton x:Name="PART_ButtonUp" Grid.Column="1" Grid.Row="0" Style="{StaticResource SpinnerButtonBackstageStyle}" RenderTransformOrigin="0,0.5" HorizontalAlignment="Stretch" BorderThickness="0,1,0,0" Margin="0,-1,-1,0">
            			<Path Width="7" Height="4" Fill="#FF757778" Stretch="Fill" Stroke="#FF000000" Data="M0,0L1,-1 2,0" HorizontalAlignment="Center" StrokeThickness="0" VerticalAlignment="Center" Margin="1,1,0,1"  RenderOptions.EdgeMode="Aliased"/>
            		</RepeatButton>
            		<RepeatButton x:Name="PART_ButtonDown" Grid.Column="1" Grid.Row="1" Style="{StaticResource SpinnerButtonBackstageStyle}" BorderThickness="0,0,1,0" Margin="0,0,-1,-1" >
            			<Path Width="7" Height="4" Fill="#FF757778" Stretch="Fill" Stroke="#FF000000" Data="M0,0L1,1 2,0" StrokeThickness="0" HorizontalAlignment="Center" Margin="1,0,0,0" VerticalAlignment="Center" RenderOptions.EdgeMode="Aliased"/>
            		</RepeatButton>
            	</Grid>
				</Border>
          	</Grid>
          
        	<ControlTemplate.Triggers>
        		
        		<Trigger Property="IsEnabled" Value="False">
        			<Setter Property="IsEnabled" TargetName="PART_TextBox" Value="False"/>
        			<Setter Property="Background" TargetName="border" Value="{DynamicResource TextBoxDisabledBackgroundBrush}"/>
        			<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource TextBoxDisabledBorderBrush}"/>
        			<Setter Property="Background" TargetName="PART_TextBox" Value="{DynamicResource TextBoxDisabledBackgroundBrush}"/>
        		</Trigger>
        		<Trigger Property="Size" Value="Middle">
        			<Setter Property="Visibility" TargetName="textBlock" Value="Collapsed"/>
        		</Trigger>
        		<Trigger Property="Size" Value="Small">
        			<Setter Property="Visibility" TargetName="stackPanel" Value="Collapsed"/>
        		</Trigger>
        		<Trigger Property="IsMouseOver" Value="True">
        			<Setter Property="Background" TargetName="border" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
        			<Setter Property="Background" TargetName="PART_TextBox" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
        			<Setter Property="BorderBrush" TargetName="border">
        				<Setter.Value>
        					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        						<GradientStop Color="#FFCFAF5A" Offset="0"/>
        						<GradientStop Color="#FFEFDA71" Offset="1"/>
        					</LinearGradientBrush>
        				</Setter.Value>
        			</Setter>
        			<Setter Property="Visibility" TargetName="border1" Value="Visible"/>
        			<Setter Property="Visibility" TargetName="border2" Value="Visible"/>
        			<Setter Property="BorderBrush" TargetName="border1" Value="#E5BEC1C4"/>
        			<Setter Property="BorderBrush" TargetName="border2" Value="#E5BEC1C4"/>
        		</Trigger>
				<Trigger Property="IsFocused" Value="True" SourceName="PART_TextBox">
        			<Setter Property="Background" TargetName="border" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
        			<Setter Property="Background" TargetName="PART_TextBox" Value="{DynamicResource TextBoxHoverBackgroundBrush}"/>
        			<Setter Property="BorderBrush" TargetName="border">
        				<Setter.Value>
        					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        						<GradientStop Color="#FFCFAF5A" Offset="0"/>
        						<GradientStop Color="#FFEFDA71" Offset="1"/>
        					</LinearGradientBrush>
        				</Setter.Value>
        			</Setter>
        			<Setter Property="Visibility" TargetName="border1" Value="Visible"/>
        			<Setter Property="Visibility" TargetName="border2" Value="Visible"/>
        			<Setter Property="BorderBrush" TargetName="border1" Value="#E5BEC1C4"/>
        			<Setter Property="BorderBrush" TargetName="border2" Value="#E5BEC1C4"/>
        		</Trigger>
        	</ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
    
    <!--Inner Backstage TabControl Style-->
    <Style TargetType="{x:Type Fluent:SeparatorTabItem}" x:Key="InnerBackstageSeparatorTabItemStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Fluent:SeparatorTabItem}">
                    <Grid Margin="0,0,10,0">
                        <TextBlock Margin="0,5" TextWrapping="Wrap" Text="{TemplateBinding Header}" VerticalAlignment="Center" FontSize="17" FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana">
                        	<TextBlock.Foreground>
                        		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}, FallbackValue=Blue}"/>                 	
							</TextBlock.Foreground>                  
						</TextBlock>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="InnerBackstageTabCotrolItem" TargetType="{x:Type TabItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid Background="#00000000" Margin="0,3">
                        <Border x:Name="border" BorderBrush="{DynamicResource TransparentBrush}" BorderThickness="1" Margin="0" Background="{DynamicResource TransparentBrush}">
                            <ContentPresenter Margin="5,5,50,5" ContentSource="Header"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelected" Value="True">
                            <Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonPressedOuterBackgroundBrush}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonPressedOuterBorderBrush}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="Selector.IsSelected" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Background" TargetName="border" Value="{DynamicResource ButtonHoverOuterBackgroundBrush}"/>
                            <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ButtonHoverOuterBorderBrush}"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="InnerBackstageTabControlStyle" TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <ControlTemplate.Resources>
                        <Style TargetType="{x:Type Fluent:SeparatorTabItem}" BasedOn="{StaticResource InnerBackstageSeparatorTabItemStyle}"/>
                        <Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource InnerBackstageTabCotrolItem}"/>
                    </ControlTemplate.Resources>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Border BorderThickness="0,0,1,0" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch">
                            <Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Offset="1" Color="#00D2D3D4"/>
                                    <GradientStop Color="#7FD2D3D4"/>
                                    <GradientStop Color="#FFD2D3D4" Offset="0.246"/>
                                    <GradientStop Color="#FFD2D3D4" Offset="0.797"/>
                                </LinearGradientBrush>

                            </Border.BorderBrush>
                        </Border>
                        <StackPanel Grid.Column="0" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" IsItemsHost="True"/>
                        <ContentPresenter x:Name="PART_SelectedContentHost" Grid.Column="1" Margin="0" VerticalAlignment="Stretch" ContentSource="SelectedContent"/>
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>